-- =========================================
-- Author: Jacob Gable
-- Created: 02.00.2009
-- Notes: Creation of BlogPostTag table.
-- 
-- 
-- =========================================

IF OBJECT_ID('dbo.BlogPostTag', 'U') IS NOT NULL
  DROP TABLE dbo.BlogPostTag
GO

CREATE TABLE dbo.BlogPostTag
(
	BlogPostID int
		FOREIGN KEY REFERENCES BlogPost (PostId)
		ON DELETE CASCADE NOT NULL, 
	TagID int
		FOREIGN KEY REFERENCES Tag (TagId)
		ON DELETE CASCADE NOT NULL, 
	ts timestamp NULL    
)
GO
